package com.cg.springSecurity.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cg.springSecurity.pojo.Role;
import com.cg.springSecurity.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author cg
 * @since 2022-05-13
 */
public interface UserMapper extends BaseMapper<User> {
    User selectByName(@Param("name") String name);

    List<Role> getUserRolesByRole(@Param("role") Integer role);

    User getUserById(@Param("id") Integer id);
}
